<div ng-controller="topBannerMngCtrl">
    <h1 class="page-header">轮播图管理</h1>

    <div class="row">
        <div class="col-xs-6 col-sm-3">
            <button type="button" class="btn btn-primary" ui-sref="index.topBannerForm">新增</button>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-6 col-sm-3">
            <div class="form-group">
                <label>名称</label>
                <input class="form-control" ng-model="search.name"/>
            </div>
        </div>

        <div class="col-xs-6 col-sm-2">
            <div class="form-group input-group">
                <label>类型:</label>
                <select class="form-control" ng-model="search.type">
                    <option value="" selected="selected">-------------默认-------------</option>
                    <option value="0">web站点</option>
                    <option value="1">手机app</option>
                </select>
            </div>
        </div>
    </div>

    <div class="row">
        <table class="table table-bordered top5">
            <thead>
            <tr>
                <th>名称</th>
                <th>类型</th>
                <th>轮播顺序</th>
                <th>操作</th>
            </tr>
            </thead>

            <tbody>
            <tr ng-repeat="item in list | filter:search">
                <td ng-bind="item.name"></td>
                <td ng-bind="item.type ? '手机app' : 'web站点'"></td>
                <td ng-bind="item.displayOrder"></td>
                <td>
                    <a ui-sref="index.topBannerForm({id:item.id})" class="btn btn-sm">编辑</a>
                    <a ui-sref="index.topBannerUpload({id:item.id})" class="btn btn-sm">上传图片</a>
                    <a ng-click="delete(item.id)" class="btn btn-sm">删除</a>
                    <!--<a ng-click="delete(item.id)" class="btn btn-sm">删除</a>-->
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>